package com.ljkj.blockpay.ui.adapter;

import android.view.View;
import android.widget.ImageView;

import androidx.annotation.NonNull;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.kongzue.baseokhttp.util.JsonList;
import com.kongzue.baseokhttp.util.JsonMap;
import com.ljkj.blockpay.R;

/**
 * Created by yp on 2022/3/17
 */
public class HomeCurrencyAdapter extends BaseQuickAdapter<JsonMap, BaseViewHolder> {
    public HomeCurrencyAdapter(int layoutResId) {
        super(layoutResId);

    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, JsonMap jsonMap) {
            ImageView icon = helper.getView(R.id.iv_icons);
            Glide.with(getContext()).load(jsonMap.getString("currencyImg")).into(icon);
            helper.setText(R.id.tv_name,jsonMap.getString("currencyName"));
            helper.setText(R.id.tv_balance,jsonMap.getString("balance"));
            helper.setText(R.id.tv_convertBalance,jsonMap.getString("convertBalance"));

    }
}
